const mongoose = require("mongoose");

const host = process.env.NODE_ENV_DB_HOST;
const port = process.env.NODE_ENV_DB_PORT_MONGODB;
const database = process.env.NODE_ENV_DB_DATABASE;

// 连接数据库
mongoose.connect(`mongodb://${host}:${port}/${database}`).then(() => {
  console.log("mongodb数据库连接成功");
});
